<template>
  <div>
    <h1 id="detail">detail</h1>
    <p>{{ data }}</p>
  </div>
</template>

<script>
import axis from 'axios';

export default {
  name: 'Test',
  data() {
    return {
      data: {},
    };
  },
  methods: {
    getData() {
      axis.get('/api/v1/tag')//axis后面的.get可以省略；
          .then(
              (response) => {
                console.log(response);
                this.data = response.data;
              })
          .catch(
              (error) => {
                console.log(error);
              });
    },
  },
  mounted() {
    this.getData();
  },
};
</script>
<style lang="scss" scoped>
</style>